package com.sq.partner.manager.service;

import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.GatewayRole;
import com.sq.partner.manager.mybatis.model.GatewayRoleMenu;
import com.sq.partner.manager.mybatis.model.GatewayUser;
import com.sq.partner.manager.mybatis.model.GatewayUserRole;
import com.sq.partner.manager.mybatis.model.TreeDto;
import com.sq.partner.manager.util.Page;

public interface IGatewayRoleService {
	
	/**
	 * 查询所有角色
	 * @param page
	 * @param pageIndex
	 * @param role
	 * @return
	 * @throws Exception
	 */
	Page queryPage(Page page, Integer pageIndex, GatewayRole role,GatewayUser user) throws Exception;
	
	/**
	 * 删除角色
	 * @param role
	 * @return
	 * @throws Exception
	 */
	boolean deleteRole(GatewayRole role) throws Exception;
	boolean delUserRoleRoleid(Long   roleid) throws Exception;
	
	/**
	 * 增加角色
	 * @param role
	 * @return
	 * @throws Exception
	 */
	Long addRole(GatewayRole role) throws Exception;
	
	/**
	 * 检查角色是否存在
	 * @return
	 */
	GatewayRole queryRoleNameExistsOrNot(Map<String,String> map) throws Exception;
	
	/**
	 * 修改角色
	 * @return
	 */
	boolean modifyRole(GatewayRole role) throws Exception;
	
}
